package com.example;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TemplateController {

	/**
	 * 
	 * 返回html模板.
	 * 
	 */

	@RequestMapping("/hello")
	public String helloHtml(Map<String, Object> map) {
		User user = new User();
		user.setAge(10);
		user.setName("刘晓东2");
		
		map.put("user", user);
		map.put("hello", "from TemplateController.helloHtml");
		return "/hello";
	}

}
